wait_timeout = "3"

QC_mqtt_cmd = [
    {
        "cmd": 'AT+QFDEL="SVR.crt"',
        "match": '.*',
    },
    {
        "cmd": 'AT+QFDEL="client.crt"',
        "match": '.*',
    },
    {
        "cmd": 'AT+QFDEL="client.key"',
        "match": '.*',
    },
    # MQTT命令测试
    {
        "cmd": 'AT+QMTCFG=?',
        "match": '\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTCFG="version",0',
        "match": 'AT\+QMTCFG="version",0\s{3}\+QMTCFG: "version",3\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTCFG="pdpcid",0',
        "match": 'AT\+QMTCFG="pdpcid",0\s{3}\+QMTCFG: "pdpcid",1\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTCFG="will",0',
        "match": 'AT\+QMTCFG="will",0\s{3}\+QMTCFG: "will",0\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTCFG="willex",0',
        "match": 'AT\+QMTCFG="willex",0\s{3}\+QMTCFG: "willex",0\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTCFG="timeout",0',
        "match": 'AT\+QMTCFG="timeout",0\s{3}\+QMTCFG: "timeout",5,3,0\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTCFG="session",0',
        "match": 'AT\+QMTCFG="session",0\s{3}\+QMTCFG: "session",1\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTCFG="keepalive",0',
        "match": 'AT\+QMTCFG="keepalive",0\s{3}\+QMTCFG: "keepalive",120\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTCFG="ssl",0',
        "match": '\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTCFG="recv/mode",0',
        "match": 'AT\+QMTCFG="recv/mode",0\s{3}\+QMTCFG: "recv/mode",\d,\d\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTCFG="aliauth",0',
        "match": '\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTCFG="qmtping",0',
        "match": 'AT\+QMTCFG="qmtping",0\s{3}\+QMTCFG: "qmtping",5\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTOPEN=?',
        "match": 'AT\+QMTOPEN=\?\s{3}\+QMTOPEN: \(0-5\),"hostname",\(1-65535\)\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTOPEN?',
        "match": '\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTCLOSE=?',
        "match": 'AT\+QMTCLOSE=\?\s{3}\+QMTCLOSE: \(0-5\)\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTCONN=?',
        "match": 'AT\+QMTCONN=\?\s{3}\+QMTCONN: \(0-5\),"clientid","username","password"\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTCONN?',
        "match": '\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTDISC=?',
        "match": 'AT\+QMTDISC=\?\s{3}\+QMTDISC: \(0-5\)\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTSUB=?',
        "match": 'AT\+QMTSUB=\?\s{3}\+QMTSUB: \(0-5\), \<msgid\>,list of \["topic",qos\]\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTUNS=?',
        "match": 'AT\+QMTUNS=\?\s{3}\+QMTUNS: \(0-5\), \<msgid\>,list of \["topic"\]\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTPUBEX=?',
        "match": 'AT\+QMTPUBEX=\?\s{3}\+QMTPUBEX: \(0-5\), \<msgid\>,\(0-2\),\(0,1\),"topic","length"\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTRECV=?',
        "match": 'AT\+QMTRECV=\?\s{3}OK\s{2}',
    },
    {
        "cmd": 'AT+QMTRECV=?',
        "match": '\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    # 阿里云
    {
        "cmd": 'AT+QMTCFG="recv/mode",0,0,1',
        "match": 'AT\+QMTCFG="recv\/mode",0,0,1\s{3}OK\s{2}',
    },
    {
        "cmd": 'AT+QMTCFG="ssl",0,0,2',
        "match": 'AT\+QMTCFG="ssl",0,0,2\s{3}OK\s{2}',
    },
    {
        "cmd": 'AT+QMTCFG="aliauth",0,"a1HvZlnlln9","862167055030435","55cdb59ae75d05d81e47a07c5aabcd58"',
        "match": 'AT\+QMTCFG="aliauth",0,"a1HvZlnlln9","862167055030435","55cdb59ae75d05d81e47a07c5aabcd58"\s{3}OK\s{2}',
    },
    {
        "cmd": 'AT+QMTOPEN=0,"iot-as-mqtt.cn-shanghai.aliyuncs.com",1883',
        "match": 'AT\+QMTOPEN=0,"iot-as-mqtt.cn-shanghai.aliyuncs.com",1883\s{3}OK\s{4}\+QMTOPEN: 0,0\s{2}',
        "wait": b'+QMTOPEN: 0,0',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTOPEN?',
        "match": 'AT\+QMTOPEN\?\s{3}\+QMTOPEN: 0,"iot-as-mqtt.cn-shanghai.aliyuncs.com",1883\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTCONN=0,"airtest"',
        "match": 'AT\+QMTCONN=0,"airtest"\s{3}OK\s{4}\+QMTCONN: 0,0,0\s{2}',
        "wait": b'+QMTCONN: 0,0,0',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTCONN?',
        "match": 'AT\+QMTCONN\?\s{3}\+QMTCONN: 0,3\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTSUB=0,1,"/a1HvZlnlln9/862167055030435/user/Jeremy",0,"/a1HvZlnlln9/862167055030435/user/Jeremy",1',
        "match": 'AT\+QMTSUB=0,1,"\/a1HvZlnlln9\/862167055030435\/user\/Jeremy",0,"\/a1HvZlnlln9\/862167055030435\/user\/Jeremy",1\s{3}OK\s{4}\++QMTSUB: 0,1,0,1,1\s{2}',
        "wait": b'+QMTSUB: 0,1,0,1,1',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTUNS=0,1,"/a1HvZlnlln9/862167055030435/user/Jeremy"',
        "match": 'AT\+QMTUNS=0,1,"\/a1HvZlnlln9\/862167055030435\/user\/Jeremy"\s{3}OK\s{4}\+QMTUNS: 0,1,0\s{2}',
        "wait": b'+QMTUNS: 0,1,0',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTSUB=0,1,"/a1HvZlnlln9/862167055030435/user/Jeremy",0,"/a1HvZlnlln9/862167055030435/user/Jeremy",1',
        "match": 'AT\+QMTSUB=0,1,"\/a1HvZlnlln9\/862167055030435\/user\/Jeremy",0,"\/a1HvZlnlln9\/862167055030435\/user\/Jeremy",1\s{3}OK\s{4}\++QMTSUB: 0,1,0,1,1\s{2}',
        "wait": b'+QMTSUB: 0,1,0,1,1',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTPUBEX=0,0,0,0,"/a1HvZlnlln9/862167055030435/user/Jeremy",3',
        "match": 'AT\+QMTPUBEX=0,0,0,0,"/a1HvZlnlln9/862167055030435/user/Jeremy",3\s{3}> ',
    },
    {
        "cmd": '123',
        "match": '123\s{2}OK\s{4}\+QMTPUBEX: 0,0,0\s{4}\+QMTRECV: 0,0,"\/a1HvZlnlln9\/862167055030435\/user\/Jeremy",3,"123"\s{2}',
        "wait": b'+QMTRECV: 0,0,"/a1HvZlnlln9/862167055030435/user/Jeremy",3,"123"',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTPUBEX=0,1,1,0,"/a1HvZlnlln9/862167055030435/user/Jeremy",3',
        "match": 'AT\+QMTPUBEX=0,1,1,0,"/a1HvZlnlln9/862167055030435/user/Jeremy",3\s{3}> ',
    },
    {
        "cmd": '123',
        "match": '123\s{2}OK\s{4}\+QMTPUBEX: 0,1,0\s{4}\+QMTRECV: 0,\d+,"\/a1HvZlnlln9\/862167055030435\/user\/Jeremy",3,"123"\s{2}',
        "wait": b'+QMTRECV: 0',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTDISC=0',
        "match": 'AT\+QMTDISC=0\s{3}OK\s{4}\+QMTDISC: 0,0\s{2}',
        "wait": b'+QMTDISC: 0,0',
        "timeout": wait_timeout
    },
    # 普通MQTT流程
    {
        "cmd": 'AT+QMTCFG="recv/mode",0,1,1',
        "match": 'AT\+QMTCFG="recv\/mode",0,1,1\s{3}OK\s{2}',
    },
    {
        "cmd": 'AT+QMTOPEN=0,"airtest.openluat.com",1883',
        "match": 'AT\+QMTOPEN=0,"airtest.openluat.com",1883\s{3}OK\s{4}\+QMTOPEN: 0,0\s{2}',
        "wait": b'+QMTOPEN: 0,0',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTOPEN?',
        "match": 'AT\+QMTOPEN\?\s{3}\+QMTOPEN: 0,"airtest.openluat.com",1883\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTCONN=0,"airtest"',
        "match": 'AT\+QMTCONN=0,"airtest"\s{3}OK\s{4}\+QMTCONN: 0,0,0\s{2}',
        "wait": b'+QMTCONN: 0,0,0',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTCONN?',
        "match": 'AT\+QMTCONN\?\s{3}\+QMTCONN: 0,3\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTSUB=0,1,"/hello/test",0',
        "match": 'AT\+QMTSUB=0,1,"\/hello\/test",0\s{3}OK\s{4}\+QMTSUB: 0,1,0,0\s{2}',
        "wait": b'+QMTSUB: 0,1,0,0',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTPUBEX=0,0,0,0,"/hello/test",19',
        "match": 'AT\+QMTPUBEX=0,0,0,0,"\/hello\/test",19\s{3}> ',
    },
    {
        "cmd": '***PPPPP1234A___+++',
        "match": '\*\*\*PPPPP1234A___\+\+\+\s{2}OK\s{4}\+QMTPUBEX: 0,0,0\s{4}\+QMTRECV: 0,0\s{2}',
        "wait": b'+QMTRECV: 0,0',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTPUBEX=0,0,0,0,"/hello/test",19',
        "match": 'AT\+QMTPUBEX=0,0,0,0,"\/hello\/test",19\s{3}> ',
    },
    {
        "cmd": '***PPPPP1234A___+++',
        "match": '\*\*\*PPPPP1234A___\+\+\+\s{2}OK\s{4}\+QMTPUBEX: 0,0,0\s{4}\+QMTRECV: 0,1\s{2}',
        "wait": b'+QMTRECV: 0,1',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTPUBEX=0,0,0,0,"/hello/test",19',
        "match": 'AT\+QMTPUBEX=0,0,0,0,"\/hello\/test",19\s{3}> ',
    },
    {
        "cmd": '***PPPPP1234A___+++',
        "match": '\*\*\*PPPPP1234A___\+\+\+\s{2}OK\s{4}\+QMTPUBEX: 0,0,0\s{4}\+QMTRECV: 0,2\s{2}',
        "wait": b'+QMTRECV: 0,2',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTPUBEX=0,0,0,0,"/hello/test",19',
        "match": 'AT\+QMTPUBEX=0,0,0,0,"\/hello\/test",19\s{3}> ',
    },
    {
        "cmd": '***PPPPP1234A___+++',
        "match": '\*\*\*PPPPP1234A___\+\+\+\s{2}OK\s{4}\+QMTPUBEX: 0,0,0\s{4}\+QMTRECV: 0,3\s{2}',
        "wait": b'+QMTRECV: 0,3',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTPUBEX=0,0,0,0,"/hello/test",19',
        "match": 'AT\+QMTPUBEX=0,0,0,0,"\/hello\/test",19\s{3}> ',
    },
    {
        "cmd": '***PPPPP1234A___+++',
        "match": '\*\*\*PPPPP1234A___\+\+\+\s{2}OK\s{4}\+QMTPUBEX: 0,0,0\s{4}\+QMTRECV: 0,4\s{2}',
        "wait": b'+QMTRECV: 0,4',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTRECV=0',
        "match": 'AT\+QMTRECV=0\s{3}\+QMTRECV: 0,0,"\/hello\/test",19,"\*\*\*PPPPP1234A___\+\+\+"\s{4}\+QMTRECV: 0,0,"\/hello\/test",19,"\*\*\*PPPPP1234A___\+\+\+"\s{4}\+QMTRECV: 0,0,"\/hello\/test",19,"\*\*\*PPPPP1234A___\+\+\+"\s{4}\+QMTRECV: 0,0,"\/hello\/test",19,"\*\*\*PPPPP1234A___\+\+\+"\s{4}\+QMTRECV: 0,0,"\/hello\/test",19,"\*\*\*PPPPP1234A___\+\+\+"\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTDISC=0',
        "match": 'AT\+QMTDISC=0\s{3}OK\s{4}\+QMTDISC: 0,0\s{2}',
        "wait": b'+QMTDISC: 0,0',
        "timeout": wait_timeout
    },
    # 带证书的MQTTSSL连接(双向认证)
    {
        "cmd": 'AT+QMTCFG="recv/mode",0,0,1',
        "match": 'AT\+QMTCFG="recv\/mode",0,0,1\s{3}OK\s{2}',
    },
    {
        "cmd": 'AT+QMTCFG="ssl",0,1,2',
        "match": 'AT\+QMTCFG="ssl",0,1,2\s{3}OK\s{2}',
    },
    {
        "cmd": 'AT+QFUPL="SVR.crt",1212',
        "match": 'AT\+QFUPL="SVR.crt",1212\s{3}CONNECT',
    },
    {
        "cmd": open("certs/mqtt/SVR.crt", "rb").read().decode(encoding="utf-8"),
        "match": '\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QFOPEN="SVR.crt"',
        "match": 'AT\+QFOPEN="SVR.crt"\s{3}\+QFOPEN: 1\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QFREAD=1',
        "match": '\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QFCLOSE=1',
        "match": 'AT\+QFCLOSE=1\s{3}OK\s{2}',
    },
    {
        "cmd": 'AT+QFUPL="client.crt",1127',
        "match": 'AT\+QFUPL="client.crt",1127\s{3}CONNECT',
    },
    {
        "cmd": open("certs/mqtt/client.crt", "rb").read().decode(encoding="utf-8"),
        "match": '\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QFOPEN="client.crt"',
        "match": 'AT\+QFOPEN="client.crt"\s{3}\+QFOPEN: 1\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QFREAD=1',
        "match": '\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QFCLOSE=1',
        "match": 'AT\+QFCLOSE=1\s{3}OK\s{2}',
    },
    {
        "cmd": 'AT+QFUPL="client.key",1679',
        "match": 'AT\+QFUPL="client.key",1679\s{3}CONNECT',
    },
    {
        "cmd": open("certs/mqtt/client.key", "rb").read().decode(encoding="utf-8"),
        "match": '\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QFOPEN="client.key"',
        "match": 'AT\+QFOPEN="client.key"\s{3}\+QFOPEN: 1\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QFREAD=1',
        "match": '\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QFCLOSE=1',
        "match": 'AT\+QFCLOSE=1\s{3}OK\s{2}',
    },
    {
        "cmd": 'AT+QSSLCFG="cacert",2,"SVR.crt"',
        "match": 'AT\+QSSLCFG="cacert",2,"SVR.crt"\s{3}OK\s{2}',
    },
    {
        "cmd": 'AT+QSSLCFG="clientcert",2,"client.crt"',
        "match": 'AT\+QSSLCFG="clientcert",2,"client.crt"\s{3}OK\s{2}',
    },
    {
        "cmd": 'AT+QSSLCFG="clientkey",2,"client.key"',
        "match": 'AT\+QSSLCFG="clientkey",2,"client.key"\s{3}OK\s{2}',
    },
    {
        "cmd": 'AT+QSSLCFG="seclevel",2,2',
        "match": 'AT\+QSSLCFG="seclevel",2,2\s{3}OK\s{2}',
    },
    {
        "cmd": 'AT+QSSLCFG="sslversion",2,4',
        "match": 'AT\+QSSLCFG="sslversion",2,4\s{3}OK\s{2}',
    },
    {
        "cmd": 'AT+QSSLCFG="ciphersuite",2,0xFFFF',
        "match": 'AT\+QSSLCFG="ciphersuite",2,0xFFFF\s{3}OK\s{2}',
    },
    {
        "cmd": 'AT+QSSLCFG="ignorelocaltime",2,1',
        "match": 'AT\+QSSLCFG="ignorelocaltime",2,1\s{3}OK\s{2}',
    },
    {
        "cmd": 'AT+QMTOPEN=0,"airtest.openluat.com",8883',
        "match": 'AT\+QMTOPEN=0,"airtest.openluat.com",8883\s{3}OK\s{4}\+QMTOPEN: 0,0\s{2}',
        "wait": b'+QMTOPEN: 0,0',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTOPEN?',
        "match": 'AT\+QMTOPEN\?\s{3}\+QMTOPEN: 0,"airtest.openluat.com",8883\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTCONN=0,"airtest"',
        "match": 'AT\+QMTCONN=0,"airtest"\s{3}OK\s{4}\+QMTCONN: 0,0,0\s{2}',
        "wait": b'+QMTCONN: 0,0,0',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTSUB=0,1,"MQTT-TEST1",1',
        "match": 'AT\+QMTSUB=0,1,"MQTT-TEST1",1\s{3}OK\s{4}\+QMTSUB: 0,1,0,1\s{2}',
        "wait": b'+QMTSUB: 0,1,0,1',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTPUBEX=0,1,1,0,"MQTT-TEST1",39',
        "match": 'AT\+QMTPUBEX=0,1,1,0,"MQTT-TEST1",39\s{3}> ',
    },
    {
        "cmd": 'hello,server!!!!--SSL with  certificate',
        "match": 'hello,server!!!!--SSL with  certificate\s{2}OK\s{4}\+QMTPUBEX: 0,1,0\s{4}\+QMTRECV: 0,1,"MQTT-TEST1",39,"hello,server!!!!--SSL with  certificate"\s{2}',
        "wait": b'+QMTRECV: 0,1',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTPUBEX=0,1,1,0,"MQTT-TEST1",39',
        "match": 'AT\+QMTPUBEX=0,1,1,0,"MQTT-TEST1",39\s{3}> ',
    },
    {
        "cmd": 'hello,server!!!!--SSL with  certificate',
        "match": 'hello,server!!!!--SSL with  certificate\s{2}OK\s{4}\+QMTPUBEX: 0,1,0\s{4}\+QMTRECV: 0,2,"MQTT-TEST1",39,"hello,server!!!!--SSL with  certificate"\s{2}',
        "wait": b'+QMTRECV: 0,2',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTPUBEX=0,1,1,0,"MQTT-TEST1",39',
        "match": 'AT\+QMTPUBEX=0,1,1,0,"MQTT-TEST1",39\s{3}> ',
    },
    {
        "cmd": 'hello,server!!!!--SSL with  certificate',
        "match": 'hello,server!!!!--SSL with  certificate\s{2}OK\s{4}\+QMTPUBEX: 0,1,0\s{4}\+QMTRECV: 0,3,"MQTT-TEST1",39,"hello,server!!!!--SSL with  certificate"\s{2}',
        "wait": b'+QMTRECV: 0,3',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+QMTDISC=0',
        "match": 'AT\+QMTDISC=0\s{3}OK\s{4}\+QMTDISC: 0,0\s{2}',
        "wait": b'+QMTDISC: 0,0',
        "timeout": wait_timeout
    },
]
